<?php if(!class_exists('raintpl')){exit;}?><?php $tpl = new RainTPL;$tpl_dir_temp = self::$tpl_dir;$tpl->assign( $this->var );$tpl->draw( dirname("header") . ( substr("header",-1,1) != "/" ? "/" : "" ) . basename("header") );?>

<?php echo fancybox(); ?>
<div class ="wrapper">

	<div class = "main wrapper" id = "schedule">
		<h1 class = "fr"><?php echo $e['schedule'];?></h1>

		<div class = "content">

			<div class = "head-bar">

				<a href = "schedule.html?date=<?php echo $prev;?>"><img src="http://localhost/waterfantasy/html/images/btn-prev-month.jpg" class = "btn-next-month"></a>
				<a href = "schedule.html?date=<?php echo $next;?>"><img src="http://localhost/waterfantasy/html/images/btn-next-month.jpg" class = "btn-next-month"></a>
				<a href = "schedule.html?date=<?php echo $today;?>"><img src="http://localhost/waterfantasy/html/images/btn-today.jpg" class = "btn-next-month" style = "margin-left:20px;"></a>

				<h2><?php echo $month;?></h2>
			</div>

			<div class = "month-view">
				<div class = "box head"><?php echo $e['sun'];?></div>
				<div class = "box head"><?php echo $e['mon'];?></div>
				<div class = "box head"><?php echo $e['tue'];?></div>
				<div class = "box head"><?php echo $e['wed'];?></div>
				<div class = "box head"><?php echo $e['thu'];?></div>
				<div class = "box head"><?php echo $e['fri'];?></div>
				<div class = "box head"><?php echo $e['sat'];?></div>

				<?php $counter1=-1; if( isset($all_box) && is_array($all_box) && sizeof($all_box) ) foreach( $all_box as $key1 => $value1 ){ $counter1++; ?>
					<div class = "box <?php echo $value1["class"];?> <?php if( $value1["date"] == $today ){ ?> today <?php } ?>">
						<span class = "date"><?php echo $value1["d"];?></span>
						<?php if( $value1["have"] == 1 ){ ?>
							<?php $counter2=-1; if( isset($all_date[$value1["date"]]) && is_array($all_date[$value1["date"]]) && sizeof($all_date[$value1["date"]]) ) foreach( $all_date[$value1["date"]] as $key2 => $value2 ){ $counter2++; ?>
								<a href = "event.php?id=<?php echo $value2["id"];?>" class = "ajax"><span class = "event <?php echo $value2["line"];?>"><?php echo $value2["topic"];?></span></a>
							<?php } ?>
						<?php } ?>
					</div>
				<?php } ?>
				<div class = "clear"></div>
			</div>

		</div>
	</div>

</div>
<script>
$(document).ready(function(){
	$(".ajax").fancybox({
		'width'				: '75%',
		'height'			: '75%',
        'autoScale'     	: false,
        'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe',
	});
});
</script>
<?php $tpl = new RainTPL;$tpl_dir_temp = self::$tpl_dir;$tpl->assign( $this->var );$tpl->draw( dirname("footer") . ( substr("footer",-1,1) != "/" ? "/" : "" ) . basename("footer") );?>